<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>关系选择器：兄弟选择器  相邻选择器</title>
		
		<style>
			/*  兄弟选择器  */
			p~span{
				background-color: lightblue;
			}
			p+span{
				color: red;
			}
			
			
			
		</style>
	</head>
	<body>
		
		<span>1</span>
		<p>0</p>
		
		<span>2</span>
		<hr>
		<div>
			<span>3</span>
		</div>
		<span>4</span>
		
		
	</body>
</html>